public class demoRTTI_1{
  public static void main(String args[]){
     Generic<Integer> iob = new Generic<Integer>(100);
     Generic<String> sob = new Generic<String>("Good");
     if (iob instanceof Generic)
       System.out.println("Generic<Integer> object is instance of Generic");
     if (iob instanceof Generic<?>)
       System.out.println("Generic<Integer> object is instance of Generic<?>");
     if (iob.getClass() == sob.getClass())
       System.out.println("Generic<Integer> class equals Generic<String> class");
  }
}
